This sample code is a improvement on my original uploading
It allows you to control PKUNZIP, and therefore unzip files, from VB4
Unlike the previous upload that couldn't close the window when the zipping was finished, this example can.
There are two important functions in the bas module:
ShellAndClose(CommandLine) 'Use this to shell to your dos program
FindWindowLike 'This is called by ShellAndClose to find any windows with "Finished" in their title
See KB article for more uses
This example uses the fact that when a dos box in Windows 95 has finished the title changes to "Finished - ....". I think this probably limits this example to Win95 only, Sorry.
This code was written as a test for another of my projects ( a C&C savegame organizer) and at the moment it will extract the files from a zip file and then search for files that are relevant to playing C&C
Chris Beach
100436.172@compuserve.com
INCLUDED FILES
README.TXT 'This file
PROGLIST.TXT 'List of my other releases or upcoming programs
PKUNZIP.PIF 'You can alter this to make the shelling suit your needs
UNZIP.BAS 'Include this with any project you want to shell from
UNZIP.FRM/FRX 'Test form files
ZIP Testing.VBP 'Test project File
ZIP Testing.EXE 'Compile project
LEGAL AND OTHER STUFF
A lot of this code is based on code and material in the Microsoft KB help files.
I have adapted, fiddled, altered, and generaly played with the information in the files until I got the solution to my problem.
Visual Basic, Windows 95 are trademarks of Microsoft Corp.
The FindWindowLike function is also copyright of somebody at Microsoft